home *** CD-ROM | disk | FTP | other *** search
/ Internet Warrior 1993 July / Internet Warrior No. 1 July 1993 - Austin Code Works.ISO / apps / pcgopher / 228_to_2.dif < prev    next >
Encoding:
Text File  |  1993-04-11  |  33.7 KB  |  1,150 lines

  1. diff -c2 228src/AcornMake ../distsrc/src/AcornMake
  2. *** 228src/AcornMake    Fri Feb 12 12:00:00 1993
  3. --- ../distsrc/src/AcornMake    Sun Mar  7 16:00:00 1993
  4. ***************
  5. *** 1,7 ****
  6. ! # Project:   Gofer
  7.   
  8.   
  9.   # Toolflags:
  10. ! CCflags = -c -depend !Depend -IC: -throwback -fac 
  11.   Linkflags = -aif -o $@ 
  12.   ObjAsmflags = -depend !Depend -ThrowBack -Stamp -quit -CloseExec
  13. --- 1,7 ----
  14. ! # Project:   Gofer228
  15.   
  16.   
  17.   # Toolflags:
  18. ! CCflags = -c -depend !Depend -IC: -throwback  -DLAMBDAVAR  
  19.   Linkflags = -aif -o $@ 
  20.   ObjAsmflags = -depend !Depend -ThrowBack -Stamp -quit -CloseExec
  21. ***************
  22. *** 10,14 ****
  23.   Squeezeflags = -o $@
  24.   AAsmflags = -depend !Depend -quit -CloseExec -To $@ -From
  25. - PCflags = -c -depend !Depend -throwback -IP:
  26.   
  27.   
  28. --- 10,13 ----
  29. ***************
  30. *** 26,30 ****
  31.   # User-editable dependencies:
  32.   
  33.   # Static dependencies:
  34.   @.o.compiler:   @.c.compiler
  35. --- 25,28 ----
  36. ***************
  37. *** 66,69 ****
  38. --- 64,74 ----
  39.   o.compiler:    h.storage
  40.   o.compiler:    h.connect
  41. + o.input:    c.input
  42. + o.input:    h.prelude
  43. + o.input:    h.storage
  44. + o.input:    h.connect
  45. + o.input:    h.command
  46. + o.input:    h.errors
  47. + o.input:    c.parser
  48.   o.static:    c.static
  49.   o.static:    h.prelude
  50. ***************
  51. *** 98,101 ****
  52. --- 103,117 ----
  53.   o.cmachine:    h.connect
  54.   o.cmachine:    h.errors
  55. + o.gofc:    c.gofc
  56. + o.gofc:    h.prelude
  57. + o.gofc:    h.storage
  58. + o.gofc:    h.command
  59. + o.gofc:    h.connect
  60. + o.gofc:    h.errors
  61. + o.gofc:    c.machdep
  62. + o.gofc:    C:h.swis
  63. + o.gofc:    C:h.os
  64. + o.gofc:    c.commonui
  65. + o.gofc:    c.output
  66.   o.builtin:    c.builtin
  67.   o.builtin:    h.prelude
  68. ***************
  69. *** 124,143 ****
  70.   o.output:    h.connect
  71.   o.output:    h.errors
  72. - o.input:    c.input
  73. - o.input:    h.prelude
  74. - o.input:    h.storage
  75. - o.input:    h.connect
  76. - o.input:    h.command
  77. - o.input:    h.errors
  78. - o.input:    c.parser
  79. - o.gofc:    c.gofc
  80. - o.gofc:    h.prelude
  81. - o.gofc:    h.storage
  82. - o.gofc:    h.command
  83. - o.gofc:    h.connect
  84. - o.gofc:    h.errors
  85. - o.gofc:    c.machdep
  86. - o.gofc:    C:h.swis
  87. - o.gofc:    C:h.os
  88. - o.gofc:    c.commonui
  89. - o.gofc:    c.output
  90. --- 140,141 ----
  91. diff -c2 228src/Makefile ../distsrc/src/Makefile
  92. *** 228src/Makefile    Fri Feb 12 12:00:00 1993
  93. --- ../distsrc/src/Makefile    Sun Mar  7 16:00:00 1993
  94. ***************
  95. *** 1,12 ****
  96.   .SUFFIXES    : .y .c .h .o .gs
  97. - HFILES        = prelude.h storage.h connect.h errors.h command.h
  98. - CFILES        = gofer.c storage.c input.c static.c type.c \
  99. -           output.c compiler.c machine.c builtin.c  \
  100. -           gofc.c cmachine.c cbuiltin.c runtime.c
  101. - INCFILES    = parser.c preds.c prims.c kind.c subst.c \
  102. -           machdep.c commonui.c
  103. - GC_SRC        = markscan.c twospace.c
  104. - YFILES        = parser.y
  105. - SOURCES        = $(HFILES) $(CFILES) $(INCFILES) $(YFILES) prelude
  106.   OBJECTS        = storage.o input.o static.o type.o compiler.o
  107.   IOBJECTS    = gofer.o builtin.o  machine.o output.o $(OBJECTS)
  108. --- 1,3 ----
  109. ***************
  110. *** 29,36 ****
  111.   # settings.
  112.   
  113. ! CC        = gcc
  114.   CFLAGS        = 
  115.   LDFLAGS        = -lm
  116.   OPTFLAGS    = -O
  117.   
  118.   all        : gofer gofc runtime.o
  119. --- 20,34 ----
  120.   # settings.
  121.   
  122. ! # IMPORTANT: make sure that you use the same compiler to build gofc
  123. ! # executables (often by setting an appropriate value in the gofcc script)
  124. ! # as you use to build the file runtime.o (as specified by the CC macro
  125. ! # below).
  126. ! CC        = cc
  127.   CFLAGS        = 
  128.   LDFLAGS        = -lm
  129.   OPTFLAGS    = -O
  130. + OPT1        =
  131. + #OPT1        = -O1
  132.   
  133.   all        : gofer gofc runtime.o
  134. ***************
  135. *** 75,86 ****
  136.   gofc.o        : prelude.h storage.h connect.h errors.h \
  137.             command.h machdep.c commonui.c output.c
  138. ! runtime.o    : prelude.h gofc.h machdep.c $(GC_SRC)
  139.   storage.o    : prelude.h storage.h connect.h errors.h
  140.   input.o        : prelude.h storage.h connect.h errors.h parser.c command.h
  141. ! static.o    : prelude.h storage.h connect.h errors.h
  142.   type.o        : prelude.h storage.h connect.h errors.h preds.c kind.c subst.c
  143.   output.o    : prelude.h storage.h connect.h errors.h
  144.   compiler.o    : prelude.h storage.h connect.h errors.h
  145. !           $(CC) -c -O1 $(CFLAGS) compiler.c
  146.   machine.o    : prelude.h storage.h connect.h errors.h
  147.   cmachine.o    : prelude.h storage.h connect.h errors.h
  148. --- 73,84 ----
  149.   gofc.o        : prelude.h storage.h connect.h errors.h \
  150.             command.h machdep.c commonui.c output.c
  151. ! runtime.o    : prelude.h gofc.h machdep.c markscan.c twospace.c
  152.   storage.o    : prelude.h storage.h connect.h errors.h
  153.   input.o        : prelude.h storage.h connect.h errors.h parser.c command.h
  154. ! static.o    : prelude.h storage.h connect.h errors.h scc.c
  155.   type.o        : prelude.h storage.h connect.h errors.h preds.c kind.c subst.c
  156.   output.o    : prelude.h storage.h connect.h errors.h
  157.   compiler.o    : prelude.h storage.h connect.h errors.h
  158. !           $(CC) -c $(OPT1) $(CFLAGS) compiler.c
  159.   machine.o    : prelude.h storage.h connect.h errors.h
  160.   cmachine.o    : prelude.h storage.h connect.h errors.h
  161. Only in ../distsrc/src: Makefile.ztc
  162. diff -c2 228src/Readme ../distsrc/src/Readme
  163. *** 228src/Readme    Fri Feb 12 17:19:24 1993
  164. --- ../distsrc/src/Readme    Sun Mar  7 16:00:00 1993
  165. ***************
  166. *** 21,24 ****
  167. --- 21,27 ----
  168.   
  169.      If appropriate, edit the Makefile as necessary to suit your system.
  170. +    In particular, make sure that the CC macro is set to the name of
  171. +    the compiler you will be using (this is usually either `cc' for the
  172. +    standard C compiler on a system or `gcc' for the GNU C compiler).
  173.   
  174.      If you plan to install the Gofer compiler, edit the file cmachine.c
  175. ***************
  176. *** 25,30 ****
  177.      so that the symbol GOFC_INCLUDE is set to a string containing the
  178.      pathname $GOFLIB/gofc.h -- you will see that my two suggested settings
  179. !    are already set as defaults.
  180.   
  181.      Specific details for particular machine/configurations are given below.
  182.   
  183. --- 28,37 ----
  184.      so that the symbol GOFC_INCLUDE is set to a string containing the
  185.      pathname $GOFLIB/gofc.h -- you will see that my two suggested settings
  186. !    are already set as defaults.  Remember that double quote characters (")
  187. !    and backslashes (\) must be escaped by a leading backslash.  For example:
  188.   
  189. +     "\"/usr/local/lib/Gofer/gofc.h\""   might be used on Unix machine,
  190. +     "\"\C:\\GOFER\\GOFC\\GOFC.H\""      might be approp. for a DOS machine.
  191.      Specific details for particular machine/configurations are given below.
  192.   
  193. ***************
  194. *** 45,49 ****
  195.      $GOFLIB and edit the file gofc.h, replacing #include "prelude.h"
  196.      with something like #include "$GOFLIB/prelude.h" -- don't actually
  197. !    enter the string "$GOFLIB/prelude" here, you're meant to replace
  198.      $GOFLIB by whatever directory name you chose at the beginning of
  199.      this process.  You will also need to copy the file runtime.o (or
  200. --- 52,56 ----
  201.      $GOFLIB and edit the file gofc.h, replacing #include "prelude.h"
  202.      with something like #include "$GOFLIB/prelude.h" -- don't actually
  203. !    enter the string "$GOFLIB/prelude.h" here, you're meant to replace
  204.      $GOFLIB by whatever directory name you chose at the beginning of
  205.      this process.  You will also need to copy the file runtime.o (or
  206. ***************
  207. *** 56,61 ****
  208.      clean off any remaining object code files too ...
  209.   
  210.   I've probably left something out here.  Please let me know if you have
  211. ! any trouble or spot anything that I've left out.
  212.   
  213.   
  214. --- 63,78 ----
  215.      clean off any remaining object code files too ...
  216.   
  217. +    IMPORTANT: If you plan to use the shell scripts provided to operate
  218. +    the Gofer compiler and you have a choice of C compilers on your
  219. +    system (e.g.  GNU gcc and a vendor-supplied cc) make sure that the C
  220. +    compiler mentioned in the script gofcc is the same C compiler used
  221. +    (in the Makefile) to compile runtime.c.  In a similar way, make sure
  222. +    that the version of gofc.h used to compile runtime.c has the same
  223. +    settings as the version of gofc.h that you put in $GOFLIB.  (This is
  224. +    only likely to be relevant if you install an alternative garbage
  225. +    collector or change the setting on ARGCHECK.)
  226.   I've probably left something out here.  Please let me know if you have
  227. ! any trouble or spot anything that you think I should have mentioned!
  228.   
  229.   
  230. ***************
  231. *** 145,148 ****
  232. --- 162,172 ----
  233.   
  234.   ---------------------
  235. + Zortech C++ v3.0 for IBM PC (>=386)
  236. + Set #define ZTC 1  and the rest to 0 in prelude.h.  Compile using the
  237. + makefile supplied as Makefile.ztc.  Thanks to John Lazenby for the patches
  238. + to get this to work!
  239. + ---------------------
  240.   DJGPP 1.09 on MSDOS:
  241.   
  242. ***************
  243. *** 201,207 ****
  244.   IBM OS/2 2.0 using EMX GCC:
  245.   
  246. ! Set #define OS2 1 and the rest to 0 in prelude.h.  The tweaks to prelude.h
  247. ! to get this working with OS/2 were sent to me by Bryan Scattergood this
  248. ! morning;  this is a last-minute update.  Thanks Bryan!
  249.   
  250.   
  251. --- 225,230 ----
  252.   IBM OS/2 2.0 using EMX GCC:
  253.   
  254. ! Set #define OS2 1 and the rest to 0 in prelude.h.  Thanks to
  255. ! Bryan Scattergood for sending the patches to get this working!
  256.   
  257.   
  258. ***************
  259. *** 209,218 ****
  260.   System V release 4 using GCC2.2:
  261.   
  262. ! Set #define SVR4 1 and the rest to 0 in prelude.h.  As in the case of OS/2,
  263. ! I received patches for SVR4 this morning from Bryan Scattergood.  Thanks
  264. ! again Bryan!
  265.   
  266.   
  267.   ---------------------
  268.   HP systems:
  269.   
  270. --- 232,259 ----
  271.   System V release 4 using GCC2.2:
  272.   
  273. ! Set #define SVR4 1 and the rest to 0 in prelude.h.  Thanks to
  274. ! Bryan Scattergood for sending the patches to get this working!
  275.   
  276.   
  277.   ---------------------
  278. + SCO Unix 3.2.4:
  279. + Set #define SVR4 1 and the rest to 0 in prelude.h.  Compile using gcc 2.2.2.
  280. + Thanks to Rodney Brown!
  281. + ---------------------
  282. + Silicon Graphics with Irix:
  283. + Set #define SVR4 1 and the rest to 0 in prelude.h.  Set the makefile to
  284. + use cc.  If you are running on a machine with a MIPS R4000 CPU, you might
  285. + also like to add -mips2 to CFLAGS (this should not be used if you want
  286. + backward compatibility with machines based on the MIPS R3000 CPU).
  287. + I think you can probably build Gofer using gcc but I haven't had the
  288. + opportunity to try that myself.
  289. + ---------------------
  290.   HP systems:
  291.   
  292. ***************
  293. *** 227,235 ****
  294.   the patches everyone!
  295.   
  296. ! It has now been verified that the HPUX patch version will at least compile
  297. ! correctly on HP series 400 workstations (68040 CPU) running HP-UX 8.0 with
  298. ! gcc, thanks to Kurt Olender!
  299.   
  300.   
  301.   ---------------------
  302.   DECstation 5000 running Ultrix 4.2 (MIPS R3000 CPU) with GCC2.3.3:
  303. --- 268,289 ----
  304.   the patches everyone!
  305.   
  306. ! It has now been verified that the HPUX patch version will at least
  307. ! compile correctly on HP series 400 workstations (68040 CPU) running
  308. ! HP-UX 8.0 with gcc, thanks to Kurt Olender!
  309.   
  310. + Gofer 2.28 has also been built on an H.P. Series 700 machine running
  311. + HP-UX 8.07.  Gofer does not work if it is compiled using gcc (2.3.3).
  312. + Use the HP C compiler (cc) in ANSI mode.   A guide to setting the
  313. + macro definitions in the Makefile:
  314.   
  315. +     CC        = cc
  316. +     CFLAGS    = -Aa -D_HPUX_SOURCE 
  317. +     LDFLAGS   = -lm
  318. +     OPTFLAGS  = +O3
  319. +     OPT1      = +O1
  320. + Thanks to Dave Sherratt for this information!
  321.   ---------------------
  322.   DECstation 5000 running Ultrix 4.2 (MIPS R3000 CPU) with GCC2.3.3:
  323. ***************
  324. *** 238,242 ****
  325. --- 292,300 ----
  326.   for the patches!
  327.   
  328. + This release of Gofer includes a slight modification, brought to my notice
  329. + by Jerry Prothero, which should also make it possible to compile Gofer using
  330. + DEC's own cc compiler instead of gcc.  Thanks Jerry!
  331.   
  332.   ---------------------
  333.   IBM AIX on RS/6000 using GCC:
  334. ***************
  335. *** 266,269 ****
  336. --- 324,339 ----
  337.   may be needed -- please let me know if you try it.  And thanks, Ray!
  338.   
  339. + Since 2.28 was first distributed I've had feedback from two people
  340. + that have compiled Gofer to run on Linux.  Bambang Prastowo wrote
  341. + to let me know that Gofer compiled without modifications (other
  342. + than setting #define LINUX 1).  Eak Khoon reported that it was
  343. + neccessary to comment out the #define const at the beginning of
  344. + prelude.h and change prototypes in prelude.h to:
  345. +    extern *getenv Args((const char *));
  346. +    extern system  Args((const char *));
  347. +    extern atof    Args((const char *));
  348. + This may be due to the use of slightly different compilers or versions
  349. + of Linux.  In any case, it should be fairly straightforward to build
  350. + Gofer to run under Linux.
  351.   
  352.   ---------------------
  353. ***************
  354. *** 283,287 ****
  355.   do not currently work.  I believe this can be solved by setting an
  356.   appropriate value for the #define allowBreak() macro in prelude.h,
  357. ! but I am not sure what definition should be used.
  358.   
  359.   
  360. --- 353,366 ----
  361.   do not currently work.  I believe this can be solved by setting an
  362.   appropriate value for the #define allowBreak() macro in prelude.h,
  363. ! but I am not sure what definition should be used.  Frederek Althoff
  364. ! has investigated this problem and believes that there may be a problem
  365. ! with the signal handling in the current version of gcc on the Amiga.
  366. ! Frederek has written a C program, included in the main distribution
  367. ! as amigaint.c, to try and help out.  In his words: `` All you have
  368. ! to do is start the program from an other shell with the process-id
  369. ! of gofer. To get this id, you have to use a program called "Status"
  370. ! (similar to "ps"). That's all. You might add this program to your
  371. ! distribution? This will `help' until the ^C-problem is fixed''.
  372. ! Thanks Frederek!
  373.   
  374.   
  375. Only in ../distsrc/src: amigaint.c
  376. diff -c2 228src/cmachine.c ../distsrc/src/cmachine.c
  377. *** 228src/cmachine.c    Fri Feb 12 12:00:00 1993
  378. --- ../distsrc/src/cmachine.c    Sun Mar  7 16:00:00 1993
  379. ***************
  380. *** 20,26 ****
  381. --- 20,30 ----
  382.   #define GOFC_INCLUDE  "\"/gofer/gofc/gofc.h\""
  383.   #else
  384. + #if     RISCOS
  385. + #define GOFC_INCLUDE "\"Lib:h.gofc\""
  386. + #else
  387.   #define GOFC_INCLUDE  "\"/usr/local/lib/Gofer/gofc.h\""
  388.   #endif
  389.   #endif
  390. + #endif
  391.   
  392.   /*#define DEBUG_CODE*/
  393. ***************
  394. *** 575,580 ****
  395.                    make(fst(snd(e)),co,l1,fbranch(mkInt(l2),d));
  396.                    asLABEL(l1);
  397. !                  srsp = savesp;
  398. !                  asSETSTK(srsp);
  399.                    make(snd(snd(e)),co,f,frunon(d));
  400.                    asLABEL(l2);
  401. --- 579,583 ----
  402.                    make(fst(snd(e)),co,l1,fbranch(mkInt(l2),d));
  403.                    asLABEL(l1);
  404. !                  asSETSTK(savesp);
  405.                    make(snd(snd(e)),co,f,frunon(d));
  406.                    asLABEL(l2);
  407. ***************
  408. *** 586,591 ****
  409.                    make(fst(snd(e)),co,l,d1);
  410.                    asLABEL(l);
  411. !                  srsp = savesp;
  412. !                  asSETSTK(srsp);
  413.                    make(snd(snd(e)),co,f,d1);
  414.                }
  415. --- 589,593 ----
  416.                    make(fst(snd(e)),co,l,d1);
  417.                    asLABEL(l);
  418. !                  asSETSTK(savesp);
  419.                    make(snd(snd(e)),co,f,d1);
  420.                }
  421. ***************
  422. *** 682,686 ****
  423.           make(t,co,f,fbranch(mkInt(l2),d));
  424.               asLABEL(l1);
  425. !         srsp = savesp;
  426.           make(e,co,f,frunon(d));
  427.           asLABEL(l2);
  428. --- 684,689 ----
  429.           make(t,co,f,fbranch(mkInt(l2),d));
  430.               asLABEL(l1);
  431. !         if (srsp!=savesp)
  432. !         asSETSTK(savesp);
  433.           make(e,co,f,frunon(d));
  434.           asLABEL(l2);
  435. ***************
  436. *** 690,694 ****
  437.           make(t,co,f,d1);
  438.           asLABEL(l1);
  439. !         srsp = savesp;
  440.           make(e,co,f,d1);
  441.       }
  442. --- 693,698 ----
  443.           make(t,co,f,d1);
  444.           asLABEL(l1);
  445. !         if (srsp!=savesp)
  446. !         asSETSTK(savesp);
  447.           make(e,co,f,d1);
  448.       }
  449. ***************
  450. *** 1622,1626 ****
  451.                 break;
  452.   
  453. !     case FLOATCELL  : fprintf(fp,"pushFloat(%g)",floatOf(instr));
  454.                 break;
  455.   
  456. --- 1626,1631 ----
  457.                 break;
  458.   
  459. !     case FLOATCELL  : fprintf(fp,"pushFloat(%s)",
  460. !                     floatToString(floatOf(instr)));
  461.                 break;
  462.   
  463. diff -c2 228src/commonui.c ../distsrc/src/commonui.c
  464. *** 228src/commonui.c    Fri Feb 12 12:00:00 1993
  465. --- ../distsrc/src/commonui.c    Sun Mar  7 16:00:00 1993
  466. ***************
  467. *** 149,153 ****
  468.                  if (heapSize<MINIMUMHEAP)
  469.                  heapSize = MINIMUMHEAP;
  470. ! #if MAXIMUMHEAP > 0
  471.                  else if (heapSize>MAXIMUMHEAP)
  472.                  heapSize = MAXIMUMHEAP;
  473. --- 149,153 ----
  474.                  if (heapSize<MINIMUMHEAP)
  475.                  heapSize = MINIMUMHEAP;
  476. ! #if MAXIMUMHEAP
  477.                  else if (heapSize>MAXIMUMHEAP)
  478.                  heapSize = MAXIMUMHEAP;
  479. diff -c2 228src/gofc.c ../distsrc/src/gofc.c
  480. *** 228src/gofc.c    Fri Feb 12 12:00:00 1993
  481. --- ../distsrc/src/gofc.c    Sun Mar  7 16:00:00 1993
  482. ***************
  483. *** 25,29 ****
  484.   #endif
  485.   
  486. ! #define VERSION "1.01 (2.28)"
  487.   
  488.   Bool dumpScs = FALSE;            /* TRUE => output sc defns      */
  489. --- 25,29 ----
  490.   #endif
  491.   
  492. ! #define VERSION "1.01 (2.28a)"
  493.   
  494.   Bool dumpScs = FALSE;            /* TRUE => output sc defns      */
  495. ***************
  496. *** 155,159 ****
  497.       strcpy(outputFile,s);
  498.   
  499. - #if !RISCOS
  500.           for (s=outputFile, dot=0; *s; ++s)    /* do something sensible   */
  501.           if (*s=='.')            /* with file extensions       */
  502. --- 155,158 ----
  503. ***************
  504. *** 160,163 ****
  505. --- 159,163 ----
  506.           dot = s;
  507.   
  508. + #if !RISCOS
  509.       if (dot && (strcmp(dot+1,"gp") == 0 || strcmp(dot+1,"prj") ==0 ||
  510.               strcmp(dot+1,"hs") == 0 || strcmp(dot+1,"lhs") ==0 ||
  511. ***************
  512. *** 170,175 ****
  513.       strcat(outputFile,suff);
  514.   #else
  515. !     strcat(outputFile,suff);
  516. !     outputFile[strlen(outputFile)-strlen(suff)] = '_'; /* No dot */
  517.   #endif
  518.       }
  519. --- 170,197 ----
  520.       strcat(outputFile,suff);
  521.   #else
  522. !         if (dot) {
  523. !             char *prev = dot;
  524. !             while (prev>outputFile && *--prev!='.')
  525. !         ;
  526. !         if (*prev == '.')
  527. !         ++prev;
  528. !         if (namecmp(prev, "gp")      || namecmp(prev, "hs") 
  529. !                  || namecmp(prev, "gs")  || namecmp(prev, "gof")
  530. !          || namecmp(prev, "lit") || namecmp(prev, "prj")
  531. !          || namecmp(prev, "lhs") || namecmp(prev, "lgs")
  532. !          || namecmp(prev, "has") || namecmp(prev, "verb")
  533. !          || namecmp(prev, "prelude")) {
  534. !         strcpy(prev, suff+1);
  535. !         strcat(prev, dot);
  536. !         }
  537. !         else {
  538. !         strcat(outputFile,suff);
  539. !         outputFile[strlen(outputFile)-strlen(suff)] = '_'; /* No dot */
  540. !         }
  541. !     }
  542. !         else {
  543. !         strcat(outputFile,suff);
  544. !         outputFile[strlen(outputFile)-strlen(suff)] = '_';       /* No dot */
  545. !         }
  546.   #endif
  547.       }
  548. diff -c2 228src/gofc.h ../distsrc/src/gofc.h
  549. *** 228src/gofc.h    Fri Feb 12 12:00:00 1993
  550. --- ../distsrc/src/gofc.h    Sun Mar  7 16:00:00 1993
  551. ***************
  552. *** 74,78 ****
  553.   #else
  554.   #define MAXBOXTAG    FLOATCELL        /* Last boxed cell tag       */
  555. ! #define safeMkFloat(n)    mkFloat(n)
  556.   #endif
  557.   #define MAXTAG        FLOATCELL        /* Last tag value       */
  558. --- 74,78 ----
  559.   #else
  560.   #define MAXBOXTAG    FLOATCELL        /* Last boxed cell tag       */
  561. ! #define safeMkFloat(n)    mkFloat((FloatPro)n)
  562.   #endif
  563.   #define MAXTAG        FLOATCELL        /* Last tag value       */
  564. ***************
  565. *** 108,112 ****
  566.   
  567.   #define mkChar(c)    ((Cell)(SMALLMIN+((unsigned)((c)%NUM_CHARS))))
  568. ! #define charOf(c)       ((char)((c)-SMALLMIN))
  569.   
  570.   #define mkDict(n)    ((Cell)(SMALLMIN+(n)))
  571. --- 108,112 ----
  572.   
  573.   #define mkChar(c)    ((Cell)(SMALLMIN+((unsigned)((c)%NUM_CHARS))))
  574. ! #define charOf(c)       ((Char)((c)-SMALLMIN))
  575.   
  576.   #define mkDict(n)    ((Cell)(SMALLMIN+(n)))
  577. diff -c2 228src/gofer.c ../distsrc/src/gofer.c
  578. *** 228src/gofer.c    Fri Feb 12 12:00:00 1993
  579. --- ../distsrc/src/gofer.c    Sun Mar  7 16:00:00 1993
  580. ***************
  581. *** 78,82 ****
  582.       /* hours of work involved by retaining my name in the banner.  Thanks! */
  583.   
  584. !     printf("Gofer Version 2.28  Copyright (c) Mark P Jones 1991-1993\n\n");
  585.       fflush(stdout);
  586.       interpreter(argc,argv);
  587. --- 78,82 ----
  588.       /* hours of work involved by retaining my name in the banner.  Thanks! */
  589.   
  590. !     printf("Gofer Version 2.28a  Copyright (c) Mark P Jones 1991-1993\n\n");
  591.       fflush(stdout);
  592.       interpreter(argc,argv);
  593. diff -c2 228src/input.c ../distsrc/src/input.c
  594. *** 228src/input.c    Fri Feb 12 12:00:00 1993
  595. --- ../distsrc/src/input.c    Sun Mar  7 16:00:00 1993
  596. ***************
  597. *** 219,225 ****
  598.   static Bool local literateMode(nm)    /* selecte literate mode for file  */
  599.   String nm; {
  600. - #if !RISCOS
  601.       String dot = 0;
  602.   
  603.       for (; *nm; ++nm)            /* look for last dot in file name  */
  604.       if (*nm == '.')
  605. --- 219,225 ----
  606.   static Bool local literateMode(nm)    /* selecte literate mode for file  */
  607.   String nm; {
  608.       String dot = 0;
  609.   
  610. + #if !RISCOS
  611.       for (; *nm; ++nm)            /* look for last dot in file name  */
  612.       if (*nm == '.')
  613. ***************
  614. *** 240,243 ****
  615. --- 240,262 ----
  616.           return TRUE;
  617.       }
  618. + #else
  619. +     char *start = nm;
  620. +     for (; *nm; ++nm)                   /* look for last dot in file name  */
  621. +         if (*nm == '.')
  622. +             dot = nm+1;
  623. +     if (dot) {
  624. +     char *prev = dot-1;
  625. +     while (prev > start && *--prev != '.')
  626. +         ;
  627. +     if (*prev == '.')
  628. +         ++prev;
  629. +     if (namecmp(prev,"hs")      || namecmp(prev,"gs")
  630. +          || namecmp(prev,"gof") || namecmp(prev,"has")
  631. +          || namecmp(prev,"prelude"))
  632. +         return FALSE;
  633. +     if (namecmp(prev,"lhs")     || namecmp(prev,"lgs")
  634. +          || namecmp(prev,"lit") ||  namecmp(prev,"verb"))
  635. +         return TRUE;
  636. +     }
  637.   #endif
  638.       return literateScripts;        /* otherwise, use the default       */
  639. ***************
  640. *** 371,375 ****
  641.       saveTokenChar(c0);
  642.       skip();
  643. !     } while (isascii(c0) && isoneof(c0,SYMBOLS));
  644.       opType = (tokenStr[0]==':' ? CONOP : VAROP);
  645.       endToken();
  646. --- 390,394 ----
  647.       saveTokenChar(c0);
  648.       skip();
  649. !     } while (c0!=EOF && isascii(c0) && isoneof(c0,SYMBOLS));
  650.       opType = (tokenStr[0]==':' ? CONOP : VAROP);
  651.       endToken();
  652. ***************
  653. *** 382,386 ****
  654.       saveTokenChar(c0);
  655.       skip();
  656. !     } while ((isascii(c0) && isalnum(c0)) || c0=='_' || c0=='\'');
  657.       endToken();
  658.       identType = isupper(tokenStr[0]) ? CONID : VARID;
  659. --- 401,405 ----
  660.       saveTokenChar(c0);
  661.       skip();
  662. !     } while ((c0!=EOF && isascii(c0) && isalnum(c0)) || c0=='_' || c0=='\'');
  663.       endToken();
  664.       identType = isupper(tokenStr[0]) ? CONID : VARID;
  665. ***************
  666. *** 399,403 ****
  667.       saveTokenChar(c0);
  668.       skip();
  669. !     } while (isascii(c0) && isdigit(c0));
  670.   
  671.       if (c0!='.' || !isascii(c1) || !isdigit(c1)) {
  672. --- 418,422 ----
  673.       saveTokenChar(c0);
  674.       skip();
  675. !     } while (c0!=EOF && isascii(c0) && isdigit(c0));
  676.   
  677.       if (c0!='.' || !isascii(c1) || !isdigit(c1)) {
  678. ***************
  679. *** 418,422 ****
  680.       saveTokenChar(c0);
  681.       skip();
  682. !     } while (isascii(c0) && isdigit(c0));
  683.   
  684.       if (c0=='e' || c0=='E') {        /* look for exponent part...       */
  685. --- 437,441 ----
  686.       saveTokenChar(c0);
  687.       skip();
  688. !     } while (c0!=EOF && isascii(c0) && isdigit(c0));
  689.   
  690.       if (c0=='e' || c0=='E') {        /* look for exponent part...       */
  691. ***************
  692. *** 438,442 ****
  693.           saveTokenChar(c0);
  694.           skip();
  695. !         } while (isascii(c0) && isdigit(c0));
  696.       }
  697.       }
  698. --- 457,461 ----
  699.           saveTokenChar(c0);
  700.           skip();
  701. !         } while (c0!=EOF && isascii(c0) && isdigit(c0));
  702.       }
  703.       }
  704. ***************
  705. *** 515,519 ****
  706.       return readEscapeChar(allowEmpty);
  707.       if (!isprint(c0)) {
  708. !     ERROR(row) "Non printable character in constant"
  709.       EEND;
  710.       }
  711. --- 534,538 ----
  712.       return readEscapeChar(allowEmpty);
  713.       if (!isprint(c0)) {
  714. !     ERROR(row) "Non printable character '\\%d' in constant", ((int)c0)
  715.       EEND;
  716.       }
  717. ***************
  718. *** 609,613 ****
  719.       do                    /* (simplified in Haskell 1.1)       */
  720.       skip();
  721. !     while (c0==' ' || c0=='\t' || c0=='\n');
  722.       if (c0!='\\') {
  723.       ERROR(row) "Missing `\\' terminating string literal gap"
  724. --- 628,633 ----
  725.       do                    /* (simplified in Haskell 1.1)       */
  726.       skip();
  727. !     while (c0==' ' || c0=='\t' || c0=='\n')
  728. !     ;
  729.       if (c0!='\\') {
  730.       ERROR(row) "Missing `\\' terminating string literal gap"
  731. ***************
  732. *** 698,702 ****
  733.       n = 10*n + (c0-'0');
  734.       skip();
  735. !     } while (isascii(c0) && isdigit(c0));
  736.   
  737.       return mkChar(n);
  738. --- 718,722 ----
  739.       n = 10*n + (c0-'0');
  740.       skip();
  741. !     } while (c0!=EOF && isascii(c0) && isdigit(c0));
  742.   
  743.       return mkChar(n);
  744. ***************
  745. *** 896,900 ****
  746.       do
  747.           skip();
  748. !     while (c0!='\n' && c0!=EOF);
  749.       if (c0=='\n')
  750.           newlineSkip();
  751. --- 916,921 ----
  752.       do
  753.           skip();
  754. !     while (c0!='\n' && c0!=EOF)
  755. !         ;
  756.       if (c0=='\n')
  757.           newlineSkip();
  758. ***************
  759. *** 1012,1016 ****
  760.   
  761.       if (!(isascii(c0) && isprint(c0))) {
  762. !     ERROR(row) "Unrecognised character in column %d", column
  763.       EEND;
  764.       }
  765. --- 1033,1038 ----
  766.   
  767.       if (!(isascii(c0) && isprint(c0))) {
  768. !     ERROR(row) "Unrecognised character '\\%d' in column %d",
  769. !            ((int)c0), column
  770.       EEND;
  771.       }
  772. ***************
  773. *** 1076,1080 ****
  774.       }
  775.   
  776. !     ERROR(row) "Unrecognised token in column %d", column
  777.       EEND;
  778.       return 0; /*NOTREACHED*/
  779. --- 1098,1102 ----
  780.       }
  781.   
  782. !     ERROR(row) "Unrecognised character '\\%d' in column %d", ((int)c0), column
  783.       EEND;
  784.       return 0; /*NOTREACHED*/
  785. diff -c2 228src/machdep.c ../distsrc/src/machdep.c
  786. *** 228src/machdep.c    Fri Feb 12 17:07:08 1993
  787. --- ../distsrc/src/machdep.c    Sun Mar  7 16:00:00 1993
  788. ***************
  789. *** 27,30 ****
  790. --- 27,38 ----
  791.   #endif
  792.   
  793. + #if ZTC
  794. + #include <stdlib.h>
  795. + #include <signal.h>
  796. + #include <fcntl.h>
  797. + #include <sys/types.h>
  798. + #include <sys/stat.h>
  799. + #endif
  800.   #if DJGPP
  801.   #include <dos.h>
  802. ***************
  803. *** 118,121 ****
  804. --- 126,138 ----
  805.       return r.r[0] != 1;
  806.   }
  807. + int namecmp(char *filename, char *spec){/* For filename extension hacks       */
  808. +     while(*spec)
  809. +         if  (tolower(*filename) != *spec++)
  810. +         return 0;
  811. +     else
  812. +         ++filename;
  813. +     return *filename == '.';
  814. + }
  815.   #endif
  816.   
  817. ***************
  818. *** 300,303 ****
  819. --- 317,324 ----
  820.   Int getTerminalWidth() {        /* determine width of terminal       */
  821.   #ifdef TIOCGWINSZ
  822. + #ifdef _M_UNIX                /* SCO Unix 3.2.4 defines TIOCGWINSZ*/
  823. + #include <sys/stream.h>            /* Required by sys/ptem.h       */
  824. + #include <sys/ptem.h>            /* Required to declare winsize       */
  825. + #endif
  826.       static struct winsize terminalSize;
  827.       ioctl(fileno(stdout),TIOCGWINSZ,&terminalSize);
  828. ***************
  829. *** 501,505 ****
  830.       Int i=0, j=0;
  831.   
  832. !     sprintf(buffer1,"%g",fl);
  833.       while (buffer1[i] && strchr("eE.",buffer1[i])==0)
  834.       buffer2[j++] = buffer1[i++];
  835. --- 522,526 ----
  836.       Int i=0, j=0;
  837.   
  838. !     sprintf(buffer1,FloatFMT,fl);
  839.       while (buffer1[i] && strchr("eE.",buffer1[i])==0)
  840.       buffer2[j++] = buffer1[i++];
  841. diff -c2 228src/machine.c ../distsrc/src/machine.c
  842. *** 228src/machine.c    Fri Feb 12 12:00:00 1993
  843. --- ../distsrc/src/machine.c    Sun Mar  7 16:00:00 1993
  844. ***************
  845. *** 448,452 ****
  846.       return pc+3;
  847.   #else
  848. !     printf("%s\t%s\n",s,floatToString(floatAt(pc+1)));
  849.       return pc+2;
  850.   #endif
  851. --- 448,452 ----
  852.       return pc+3;
  853.   #else
  854. !     printf("%s\t%s\n",s,floatToString((FloatPro)floatAt(pc+1)));
  855.       return pc+2;
  856.   #endif
  857. ***************
  858. *** 774,778 ****
  859.    * Lambda lifting, in particular, is likely to introduce such functions.
  860.    * Rather than reconstructing a new instance of the recursive function and
  861. !  * it's arguments, we can extract the relevant portion of the root of the
  862.    * current redex.
  863.    *
  864. --- 774,778 ----
  865.    * Lambda lifting, in particular, is likely to introduce such functions.
  866.    * Rather than reconstructing a new instance of the recursive function and
  867. !  * its arguments, we can extract the relevant portion of the root of the
  868.    * current redex.
  869.    *
  870. diff -c2 228src/preds.c ../distsrc/src/preds.c
  871. *** 228src/preds.c    Fri Feb 12 12:00:00 1993
  872. --- ../distsrc/src/preds.c    Sun Mar  7 16:00:00 1993
  873. ***************
  874. *** 179,182 ****
  875. --- 179,183 ----
  876.           Bool aft = instsCompare(in,hd(ins));
  877.           if (bef==aft) {
  878. +         class(cl).instances = revOnto(done,ins);
  879.           ERROR(line) "Overlapping instances for class \"%s\"",
  880.                   textToStr(class(inst(in).cl).text)
  881. diff -c2 228src/prelude.h ../distsrc/src/prelude.h
  882. *** 228src/prelude.h    Fri Feb 12 17:14:20 1993
  883. --- ../distsrc/src/prelude.h    Sun Mar  7 16:00:00 1993
  884. ***************
  885. *** 33,36 ****
  886. --- 33,37 ----
  887.   #define LINUX    0      /* For Linux using gcc                UN */
  888.   #define DJGPP    0    /* For DJGPP version 1.09 (gcc2.2.2) and DOS 5.0   */
  889. + #define ZTC      0    /* For IBM PC (>= 386) Zortech C++ v3.0 (-mx)       */
  890.   #define RISCOS   0    /* For Acorn DesktopC and RISCOS2 or 3           */
  891.   #define ALPHA     0    /* For DEC Alpha with OSF/1 (32 bit ints, no gofc) */
  892. ***************
  893. *** 66,73 ****
  894.                  MINIX68K |ALPHA | OS2 | SVR4 | ULTRIX | AIX)
  895.   #define SMALL_GOFER   (TURBOC | BCC)
  896. ! #define REGULAR_GOFER (RISCOS | DJGPP)
  897.   #define LARGE_GOFER   (UNIX   | ALPHA)
  898. ! #define JMPBUF_ARRAY  (UNIX   | DJGPP | RISCOS)
  899. ! #define DOS_IO        (TURBOC | BCC | DJGPP)
  900.   #define TERMIO_IO     (LINUX  | HPUX | OS2 | SVR4)
  901.   #define SGTTY_IO      (SUNOS  | NEXTSTEP | NEXTGCC | AMIGA | MINIX68K | \
  902. --- 67,74 ----
  903.                  MINIX68K |ALPHA | OS2 | SVR4 | ULTRIX | AIX)
  904.   #define SMALL_GOFER   (TURBOC | BCC)
  905. ! #define REGULAR_GOFER (RISCOS | DJGPP | ZTC)
  906.   #define LARGE_GOFER   (UNIX   | ALPHA)
  907. ! #define JMPBUF_ARRAY  (UNIX   | DJGPP | RISCOS | ZTC)
  908. ! #define DOS_IO        (TURBOC | BCC | DJGPP | ZTC)
  909.   #define TERMIO_IO     (LINUX  | HPUX | OS2 | SVR4)
  910.   #define SGTTY_IO      (SUNOS  | NEXTSTEP | NEXTGCC | AMIGA | MINIX68K | \
  911. ***************
  912. *** 124,127 ****
  913. --- 125,130 ----
  914.    *   FOPEN_WRITE        fopen *text* file for writing
  915.    *   FOPEN_APPEND       fopen *text* file for append
  916. +  *
  917. +  * N.B. `far' must be explicitly defined (usually to the empty string)
  918.    *-------------------------------------------------------------------------*/
  919.   
  920. ***************
  921. *** 129,133 ****
  922.   #define Args(x) x
  923.   #else
  924. ! #if (TURBOC | BCC)        /* K&R 1 does not permit `defined(__STDC__)' ... */
  925.   #define Args(x) x
  926.   #else
  927. --- 132,136 ----
  928.   #define Args(x) x
  929.   #else
  930. ! #if (TURBOC | BCC | ZTC)  /* K&R 1 does not permit `defined(__STDC__)' ... */
  931.   #define Args(x) x
  932.   #else
  933. ***************
  934. *** 162,166 ****
  935.   #endif
  936.   
  937. ! #if     (HPUX | DJGPP | LINUX | ALPHA | OS2 | SVR4 | AIX)
  938.   #include <stdlib.h>
  939.   #define far
  940. --- 165,169 ----
  941.   #endif
  942.   
  943. ! #if     (HPUX | DJGPP | ZTC | LINUX | ALPHA | OS2 | SVR4 | AIX)
  944.   #include <stdlib.h>
  945.   #define far
  946. ***************
  947. *** 176,179 ****
  948. --- 179,183 ----
  949.   #define  MainDone    return 0;/*NOTUSED*/
  950.   extern   int access    Args((char *, int));
  951. + extern   int namecmp    Args((char *, char *));
  952.   #endif
  953.   
  954. ***************
  955. *** 209,213 ****
  956.   #endif
  957.   
  958. ! #if (UNIX | DJGPP | RISCOS)
  959.   #define ctrlbrk(bh)       signal(SIGINT,bh)
  960.   #endif
  961. --- 213,217 ----
  962.   #endif
  963.   
  964. ! #if (UNIX | DJGPP | RISCOS | ZTC)
  965.   #define ctrlbrk(bh)       signal(SIGINT,bh)
  966.   #endif
  967. ***************
  968. *** 227,230 ****
  969. --- 231,235 ----
  970.   typedef unsigned Unsigned;
  971.   
  972. + #ifndef STD_PRELUDE
  973.   #if     RISCOS
  974.   #define STD_PRELUDE       "prelude"
  975. ***************
  976. *** 232,235 ****
  977. --- 237,241 ----
  978.   #define STD_PRELUDE       "standard.prelude"
  979.   #endif
  980. + #endif
  981.   
  982.   #define NUM_SYNTAX         100
  983. ***************
  984. *** 304,310 ****
  985.   #endif
  986.   
  987. ! #if    (REGULAR_GOFER | MEDIUM_GOFER) & BREAK_FLOATS
  988.   #define FloatImpType       double
  989.   #define FloatPro       double
  990.   #else
  991.   #define FloatImpType       float
  992. --- 310,317 ----
  993.   #endif
  994.   
  995. ! #if    (REGULAR_GOFER | LARGE_GOFER) & BREAK_FLOATS
  996.   #define FloatImpType       double
  997.   #define FloatPro       double
  998. + #define FloatFMT           "%.9g"
  999.   #else
  1000.   #define FloatImpType       float
  1001. ***************
  1002. *** 312,315 ****
  1003. --- 319,323 ----
  1004.                      /* strictly ansi (i.e. gcc) conforming  */
  1005.                      /* but breaks data hiding :-(       */
  1006. + #define FloatFMT       "%g"
  1007.   #endif
  1008.   #else
  1009. ***************
  1010. *** 316,319 ****
  1011. --- 324,328 ----
  1012.   #define FloatImpType       int     /*dummy*/
  1013.   #define FloatPro       int
  1014. + #define FloatFMT       "%d"
  1015.   #endif
  1016.   
  1017. diff -c2 228src/prims.c ../distsrc/src/prims.c
  1018. *** 228src/prims.c    Fri Feb 12 12:00:00 1993
  1019. --- ../distsrc/src/prims.c    Sun Mar  7 16:00:00 1993
  1020. ***************
  1021. *** 908,914 ****
  1022.               break;
  1023.   
  1024. !     case FLOATCELL: output = stringOutput(floatToString(whnfFloat),
  1025. !                           output);
  1026. !             pr     = nameNPrint;
  1027.               break;
  1028.   
  1029. --- 908,917 ----
  1030.               break;
  1031.   
  1032. !     case FLOATCELL: if (whnfFloat<0.0 && d>=FUN_PREC)
  1033. !                 output = ap(consOpen,output);
  1034. !             output = stringOutput(floatToString(whnfFloat),output);
  1035. !             if (whnfFloat<0.0 && d>=FUN_PREC)
  1036. !                 output = ap(consClose,output);
  1037. !             pr = nameNPrint;
  1038.               break;
  1039.   
  1040. diff -c2 228src/static.c ../distsrc/src/static.c
  1041. *** 228src/static.c    Fri Feb 12 12:00:00 1993
  1042. --- ../distsrc/src/static.c    Sun Mar  7 16:00:00 1993
  1043. ***************
  1044. *** 394,400 ****
  1045.   Type t; {                /* assuming that all relevant      */
  1046.       Cell h = t;                /* synonym defns of lower rank have*/
  1047. !     for (; isAp(h); h=fun(h))        /* already been fully expanded       */
  1048.       arg(h) = fullExpand(arg(h));
  1049. !     if (isSynonym(h))
  1050.           t = instantiateSyn(tycon(h).defn,t);
  1051.       return t;
  1052. --- 394,401 ----
  1053.   Type t; {                /* assuming that all relevant      */
  1054.       Cell h = t;                /* synonym defns of lower rank have*/
  1055. !     Int  n = 0;                /* already been fully expanded       */
  1056. !     for (; isAp(h); h=fun(h), n++)
  1057.       arg(h) = fullExpand(arg(h));
  1058. !     if (isSynonym(h) && n==tycon(h).arity)
  1059.           t = instantiateSyn(tycon(h).defn,t);
  1060.       return t;
  1061. diff -c2 228src/storage.c ../distsrc/src/storage.c
  1062. *** 228src/storage.c    Fri Feb 12 12:00:00 1993
  1063. --- ../distsrc/src/storage.c    Sun Mar  7 16:00:00 1993
  1064. ***************
  1065. *** 264,272 ****
  1066.   Cell   what;
  1067.   Cell   defn; {
  1068. !     Tycon tc       = newTycon(findText(s));
  1069. !     tycon(tc).line = 0;
  1070. !     tycon(tc).kind = kind;
  1071. !     tycon(tc).what = what;
  1072. !     tycon(tc).defn = defn;
  1073.       return tc;
  1074.   }
  1075. --- 264,275 ----
  1076.   Cell   what;
  1077.   Cell   defn; {
  1078. !     Tycon tc        = newTycon(findText(s));
  1079. !     tycon(tc).line  = 0;
  1080. !     tycon(tc).kind  = kind;
  1081. !     tycon(tc).what  = what;
  1082. !     tycon(tc).defn  = defn;
  1083. !     tycon(tc).arity = 0;
  1084. !     for (; isAp(kind); kind=snd(kind))
  1085. !     ++tycon(tc).arity;
  1086.       return tc;
  1087.   }
  1088. diff -c2 228src/type.c ../distsrc/src/type.c
  1089. *** 228src/type.c    Fri Feb 12 12:00:00 1993
  1090. --- ../distsrc/src/type.c    Sun Mar  7 16:00:00 1993
  1091. ***************
  1092. *** 4,8 ****
  1093.    *              Gofer version 2.28 January 1993
  1094.    *
  1095. !  * This is the gofer type checker:  Based on the extended algorithm in my
  1096.    * PRG technical report PRG-TR-10-91, supporting the use of qualified types
  1097.    * in the form of multi-parameter type classes, according to my `new
  1098. --- 4,8 ----
  1099.    *              Gofer version 2.28 January 1993
  1100.    *
  1101. !  * This is the Gofer type checker:  Based on the extended algorithm in my
  1102.    * PRG technical report PRG-TR-10-91, supporting the use of qualified types
  1103.    * in the form of multi-parameter type classes, according to my `new
  1104. ***************
  1105. *** 508,511 ****
  1106. --- 508,512 ----
  1107.       static String list    = "list";
  1108.       static String discr = "case discriminant";
  1109. +     static String aspat = "as (@) pattern";
  1110.   
  1111.       switch (whatIs(e)) {
  1112. ***************
  1113. *** 623,628 ****
  1114.                 break;
  1115.   
  1116. !     case ASPAT    : snd(snd(e)) = typeExpr(l,snd(snd(e)));
  1117. !               bindTv(newVarsBind(fst(snd(e))),typeIs,typeOff);
  1118.                 break;
  1119.   
  1120. --- 624,633 ----
  1121.                 break;
  1122.   
  1123. !     case ASPAT    : {   Int beta = newTyvars(1);
  1124. !                   snd(snd(e)) = typeExpr(l,snd(snd(e)));
  1125. !                   bindTv(beta,typeIs,typeOff);
  1126. !                   check(l,fst(snd(e)),e,aspat,var,beta);
  1127. !                   tyvarType(beta);
  1128. !               }
  1129.                 break;
  1130.   
  1131.